#include <iostream>
#include <queue>
#include <list>
#include <set>

using  namespace std;

struct WeightedEdge {
  int tail;
  int head;
  double weight;

  WeightedEdge(int t, int h, double w) {
    tail = t;
    head = h;
    weight = w;
  }

  bool operator<(const WeightedEdge& rhs) const {
    return weight > rhs.weight;
  }

  bool operator==(const WeightedEdge& rhs) const {
    return weight == rhs.weight && tail = rhs.tail && head = rhs.head;
  }

};

void kruskal(const set<WeightedEdge>& edges, const int& n_nodes, set<WeightedEdge>& mst) {
  priority_queue<WeightedEdge> s_edges(edges.begin(),edges.end());
  set<int> visited;
  
  svn while(visited.size() < n_nodes-1 ) {
    const WeightedEdge* current = &(s_edges.top());
    s_edges.pop();
    if( !(visited.find(current->head) != set::end && visited.find(current->tail) != set::end ) ) {
      mst.insert(current);
      visited.insert(current->head);
      visited.insert(current->tail);
    }
  }
}

int main() {

  WeightedEdge e1(4, 7, 6);
  WeightedEdge e2(5, 6, 8);
  cout << e1.weight << endl;

  if(e1<e2)
    cout << "aloha"<< endl;

  priority_queue<WeightedEdge> p1;
  p1.push(e1);
  p1.push(e2);

  cout << "Popping out elements...";
  while (!p1.empty()) {
    cout << p1.top().weight << " ";
    p1.pop(); 
  }
  cout << endl;

  

  return 0;
}
